package vip.ifmm.lehouse.common.enums.status;

import vip.ifmm.lehouse.common.enums.Statable;

/**
 * @author: mackyhuang
 * <p>email: mackyhuang@163.com <p>
 * <p>date: 2019/6/17 </p>
 */
public enum FileStatus implements Statable {

    UPLOAD_SUCCESS(0, "文件上传成功"),
    UNI_CODE_EMPTY(-1000, "唯一标识不能为空"),
    FILE_IS_EMPTY(-1001, "文件不能为空"),
    MODULE_IS_EMPTY(-1002, "模块名不能为空"),
    EXTENSION_IS_EMPTY(-1003, "扩展名不能为空"),
    FILE_INFO_LACKED(-1004, "文件信息缺失"),
    FILE_SAVE_FAIL(-1005, "文件存储失败"),
    FILE_SAVE_SUCCESS(-1005, "文件存储成功");

    private String msg;

    private int code;

    FileStatus(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
